﻿@using Ext.Net
@using Ext.Net.MVC
<!DOCTYPE html>
<html>
    <head>
        <title>Trang quản trị diễn đàn Ungthuvn</title>
        <script src="/Scripts/extjs-utils.js" type="text/javascript"></script>
    </head>
<body>
    <div class="page" style="padding: 1px">
        @Html.X().ResourceManager().Theme(Theme.Default)
        @Html.X().Viewport().Layout("BorderLayout").Items(
            Html.X().Panel().Region(Region.West).Split(true).Border(false).Width(width: 200).Header(false).Collapsed(false)
                .Items(
                    Html.X().Panel().Layout(LayoutType.Accordion).Items(
                        Html.X().MenuPanel().ID("MenuHome").Icon(Icon.House).Title(Membership.GetUser() != null ? "Xin chào: <b>" + Membership.GetUser().UserName + "</b>" : "Home").Menu(menu =>
                                                      {
                                                          menu.Items.Add(Html.X().MenuItem().Text("Danh sách tài khoản").Listeners(li => li.Click.Handler = "addTab(#{Pages}, 'Tài khoản', '/Account/ListAcount');").Icon(Icon.UserGo));
                                                          menu.Items.Add(Html.X().MenuItem().Text("Đổi mật khẩu").Listeners(li => li.Click.Handler = "addTab(#{Pages}, 'Đổi mật khẩu', '/Account/ChangePasswordAdmin');").Icon(Icon.UserGo));
                                                          menu.Items.Add(Html.X().MenuItem().Text("Quản lý diễn đàn").Listeners(li => li.Click.Handler = "addTab(#{Pages}, 'Quản lý diễn đàn', '/Account/ListAcount');").Icon(Icon.BookEdit));
                                                          menu.Items.Add(Html.X().MenuItem().Text("Thoát").Listeners(li => li.Click.Handler = "window.location = '/Account/LogOff'").Icon(Icon.ControlPowerBlue));
                                                      }),
                        Html.X().MenuPanel().ID("MenuCate").Icon(Icon.New).Title("Quản lý Category").Menu(menu => menu.Items.Add(Html.X().MenuItem().Text("Category").Listeners(li => li.Click.Handler = "addTab(#{Pages}, 'Category', '/Category/ListCategory');").Icon(Icon.NewspaperAdd)))
                        )
                ),
            Html.X().Panel().Region(Region.Center).Title("Center").Header(false).Layout(LayoutType.Fit).Items(
            Html.X().TabPanel().ID("Pages").Plugins(plug=>plug.Add(new TabCloseMenu()))
                              .Items(Html.X().Panel().Title("Home").AutoScroll(false).Loader(Html.X().ComponentLoader().Url("/Admin/Home").Mode(LoadMode.Frame).LoadMask(mask=>mask.ShowMask=true)))
            ),
            Html.X().Panel().Layout(LayoutType.Absolute).Region(Region.North).Height(90).StyleSpec("color: blue").Items(
                Html.X().HyperLink().NavigateUrl("http://localhost:1834/").ImageUrl("../../Content/Image/banner-admin.png").StyleSpec("Margin: 0 0 0 30px")
                )
        )
    </div>
</body>
</html>
